package com.example.concurrentprogramming8016.future.forkjoin.arraysum;

/**
 * @author liyanhao
 * @Date 2023-01-08 0:06
 */
public class SumUtils {
    /**
     * 数组求和
     *
     * @param arr
     * @return
     */
    public static long arrSum(int[] arr, int start, int end) {
        long result = 0;
        for (int i = start; i < end; i++) {
            result += arr[i];
        }
        return result;
    }
}
